<?php

	//Router::connect('/typography/*'									, array('controller' => 'pages', 'action' => 'display', 'typography'));
	//Router::connect('/:shop/typography/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'pages', 'action' => 'display', 'typography'));
	//Router::connect('/:shop/dashboard/typography/*'					, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'dashboard_index'));
	
	// Web Sections
	Router::connect('/'												, array('controller' => 'home', 'action' => 'index'));
	
	Router::connect('/email/*'										, array('controller' => 'email', 'action' => 'display'));
	
	Router::connect('/shops'										, array('controller' => 'shops', 'action' => 'explore'));
	Router::connect('/shops/available'								, array('controller' => 'shops', 'action' => 'available'));
	Router::connect('/people'										, array('controller' => 'users', 'action' => 'explore'));
	Router::connect('/updates'										, array('controller' => 'posts', 'action' => 'explore'));
	Router::connect('/products'										, array('controller' => 'products', 'action' => 'explore'));
	
	Router::connect('/themes'										, array('controller' => 'themes', 'action' => 'index'));
	
	Router::connect('/popular/*'									, array('controller' => 'popular', 'action' => 'index'));
	Router::connect('/directory'									, array('controller' => 'industries', 'action' => 'index'));
	Router::connect('/directory/*'									, array('controller' => 'industries', 'action' => 'details'));
	
	Router::connect('/map/:action/*'								, array('controller' => 'map'));
	Router::connect('/search/*'										, array('controller' => 'search', 'action' => 'index'));
	Router::connect('/opensearch.xml'								, array('controller' => 'search', 'action' => 'index'));
	Router::connect('/rss/*'										, array('controller' => 'pages', 'action' => 'display', 'rss'));

	Router::connect('/plans'										, array('controller' => 'pages', 'action' => 'display', 'plans'));
	Router::connect('/explore'										, array('controller' => 'pages', 'action' => 'display', 'explore'));
	Router::connect('/help'											, array('controller' => 'pages', 'action' => 'display', 'help'));
	Router::connect('/how-it-works'									, array('controller' => 'pages', 'action' => 'display', 'how-it-works'));
	Router::connect('/about'										, array('controller' => 'pages', 'action' => 'display', 'about'));
	Router::connect('/about/contact'								, array('controller' => 'pages', 'action' => 'display', 'contact'));
	Router::connect('/about/opensource'								, array('controller' => 'pages', 'action' => 'display', 'opensource'));
	Router::connect('/tour'											, array('controller' => 'pages', 'action' => 'display', 'tour'));
	Router::connect('/tour/store'									, array('controller' => 'pages', 'action' => 'display', 'tour_store'));
	Router::connect('/support'										, array('controller' => 'pages', 'action' => 'display', 'support'));
	Router::connect('/legal/content-policy'							, array('controller' => 'pages', 'action' => 'display', 'content-policy'));
	Router::connect('/legal/terms-of-service'						, array('controller' => 'pages', 'action' => 'display', 'terms-of-service'));
	Router::connect('/legal/privacy-policy'							, array('controller' => 'pages', 'action' => 'display', 'privacy-policy'));

	Router::connect('/signup'										, array('controller' => 'users', 'action' => 'signup'));
	Router::connect('/signup/?shortcut=:shortcut'					, array('controller' => 'users', 'action' => 'signup', 'shortcut' => '[a-zA-Z0-9]+'));
	Router::connect('/signup/shop/available'						, array('controller' => 'shops', 'action' => 'available'));
	Router::connect('/login'										, array('controller' => 'users', 'action' => 'login'));
	Router::connect('/logout'										, array('controller' => 'users', 'action' => 'logout'));
	
	Router::connect('/people/:shortcut'								, array('controller' => 'users', 'action' => 'people', 'shortcut' => '[a-zA-Z0-9]+'));
	
	Router::connect('/me'											, array('controller' => 'users', 'action' => 'profile'));
	Router::connect('/me/settings'									, array('controller' => 'users', 'action' => 'settings'));
	Router::connect('/me/settings/notifications'					, array('controller' => 'users', 'action' => 'notifications'));
	Router::connect('/me/settings/password'							, array('controller' => 'users', 'action' => 'change_pw'));

	//Router::connect('/dashboard'									, array('controller' => 'users', 'action' => 'dashboard_index'));
	//Router::connect('/dashboard/settings'							, array('controller' => 'users', 'action' => 'dashboard_settings'));
	//Router::connect('/dashboard/settings/personal'					, array('controller' => 'users', 'action' => 'dashboard_personal'));
	
	Router::connect('/accounts/connections'							, array('controller' => 'users', 'action' => 'connections'));
	Router::connect('/accounts/connections/facebook'				, array('controller' => 'users', 'action' => 'connections', 'type' => 'facebook'));
	Router::connect('/accounts/connections/twitter'					, array('controller' => 'users', 'action' => 'connections', 'type' => 'twitter'));
	
	Router::connect('/accounts/forgot_pw'							, array('controller' => 'users', 'action' => 'forgot_pw'));
	
	Router::connect('/webpay/integrate/dm'							, array('controller' => 'webpay', 'action' => 'create_dm'));

//	Router::connect('/cataloges'									, array('controller' => 'cataloges', 'action' => 'index'));
//	Router::connect('/cataloges/:year/:month'						, array('controller' => 'cataloges', 'action' => 'date'));
//	Router::connect('/shops'										, array('controller' => 'shops', 'action' => 'explorer'));
//	Router::connect('/shops/:action/*'								, array('controller' => 'shops'));
//	Router::connect('/accounts/:action/*'							, array('controller' => 'users'));
//	Router::connect('/customers/:action/*'							, array('controller' => 'customers'));
//	Router::connect('/sales/:action/*'								, array('controller' => 'sales'));
//	Router::connect('/carts/:action/*'								, array('controller' => 'carts'));
//	Router::connect('/wishlist/:action/*'							, array('controller' => 'wishlist'));
//	Router::connect('/checkouts/:action/*'							, array('controller' => 'checkouts'));
	
	// App
	Router::connect('/upload/:controller/:action/*'					, array('layout' => 'ajax', 'isAjax' => true, 'upload' => true));
	Router::connect('/ajax/:controller/:action/*'					, array('layout' => 'ajax', 'isAjax' => true));
	Router::connect('/popup/:controller/:action/*'					, array('layout' => 'popup'));
	Router::connect('/iframe/:controller/:action/*'					, array('layout' => 'iframe'));
	Router::connect('/print/:controller/:action/*'					, array('layout' => 'print'));
	Router::connect('/pdf/:controller/:action/*'					, array('layout' => 'pdf'));
	
	Router::connect('/:shop/ajax/:controller/:action/*'				, array('shop' => '[a-zA-Z0-9]+', 'layout' => 'ajax', 'isAjax' => 1));
	Router::connect('/:shop/popup/:controller/:action/*'			, array('shop' => '[a-zA-Z0-9]+', 'layout' => 'popup'));
	Router::connect('/:shop/iframe/:controller/:action/*'			, array('shop' => '[a-zA-Z0-9]+', 'layout' => 'iframe'));
	Router::connect('/:shop/print/:controller/:action/*'			, array('shop' => '[a-zA-Z0-9]+', 'layout' => 'print'));
	
	// Dashboard
	Router::connect('/:shop/dashboard'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'dashboard_index'));
	Router::connect('/:shop/settings'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'dashboard_settings'));
	Router::connect('/:shop/settings/theme'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'dashboard_theme'));
	Router::connect('/:shop/settings/logo'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'dashboard_logo'));
	Router::connect('/:shop/settings/shortcut'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'dashboard_shortcut'));
	Router::connect('/:shop/settings/notifications'					, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'dashboard_notifications'));
	Router::connect('/:shop/settings/stats'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'dashboard_stats'));
	
	Router::connect('/:shop/orders'									, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'orders', 'action' => 'dashboard_index'));
	
	Router::connect('/:shop/stock'									, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products', 'action' => 'dashboard_index'));
	Router::connect('/:shop/stock/details/*'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products', 'action' => 'dashboard_details'));
	Router::connect('/:shop/stock/add/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products', 'action' => 'dashboard_add'));
	Router::connect('/:shop/stock/edit/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products', 'action' => 'dashboard_edit'));
	Router::connect('/:shop/stock/delete/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products', 'action' => 'dashboard_delete'));
	
	Router::connect('/:shop/stock/product/preview/delete/*'			, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products_images', 'action' => 'dashboard_delete'));
	Router::connect('/:shop/stock/product/preview/*'				, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products_images', 'action' => 'dashboard_preview'));

	Router::connect('/:shop/categories'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'taxonomies', 'action' => 'dashboard_index'));
	Router::connect('/:shop/categories/add/*'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'taxonomies', 'action' => 'dashboard_add'));
	Router::connect('/:shop/categories/edit/*'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'taxonomies', 'action' => 'dashboard_edit'));
	Router::connect('/:shop/categories/delete/*'					, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'taxonomies', 'action' => 'dashboard_delete'));
	Router::connect('/:shop/categories/getByParent/*'				, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'taxonomies', 'action' => 'getByParent'));

	Router::connect('/:shop/customers'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'customers', 'action' => 'dashboard_index'));
	Router::connect('/:shop/customers/add/*'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'customers', 'action' => 'dashboard_add'));
	Router::connect('/:shop/customers/edit/*'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'customers', 'action' => 'dashboard_edit'));

	Router::connect('/:shop/tags'									, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'tags', 'action' => 'dashboard_index'));
	Router::connect('/:shop/tags/add/*'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'tags', 'action' => 'dashboard_add'));
	Router::connect('/:shop/tags/edit/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'tags', 'action' => 'dashboard_edit'));
	Router::connect('/:shop/tags/delete/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'tags', 'action' => 'dashboard_delete'));

	Router::connect('/:shop/docs/*'									, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'dashboard_index', 'type' => 'pages'));
	Router::connect('/:shop/docs/add/*'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'dashboard_add', 'type' => 'pages'));
	Router::connect('/:shop/docs/edit/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'dashboard_edit', 'type' => 'pages'));
	
	Router::connect('/:shop/nodes/*'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'dashboard_index', 'type' => 'blog'));
	Router::connect('/:shop/nodes/edit/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'dashboard_edit', 'type' => 'blog'));
	Router::connect('/:shop/nodes/add/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'dashboard_add', 'type' => 'blog'));

	Router::connect('/:shop/marketing/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'marketing', 'action' => 'dashboard_index'));
	Router::connect('/:shop/marketing/edit/*'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'marketing', 'action' => 'dashboard_edit'));
	Router::connect('/:shop/marketing/add/*'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'marketing', 'action' => 'dashboard_add'));
	
	// Shops
	Router::connect('/:shop/signup'									, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'customers', 'action' => 'signup'));
	
	Router::connect('/:shop/collections/*'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products', 'action' => 'collections'));
	Router::connect('/:shop/product/*'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products', 'action' => 'details'));
	//Router::connect('/:shop/collections/:slug'					, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'taxonomies', 'action' => 'details', 'slug' => '[a-zA-Z0-9]+'));
	//Router::connect('/:shop/product/:slug'						, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'products', 'action' => 'details', 'slug' => '[a-zA-Z0-9]+'));

	Router::connect('/:shop/archive/*'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'archive'));
	
	Router::connect('/:shop/checkout/:order/:action'				, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'checkout', 'action' => 'index'));
	
	//Router::connect('/:shop/pages/:slug'							, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'details', 'type' => 'pages', 'slug' => '[a-zA-Z0-9]+'));
	Router::connect('/:shop/pages/*'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'details', 'type' => 'pages'));
	Router::connect('/:shop/pages'									, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'index', 'type' => 'pages'));
	Router::connect('/:shop/blog/:year/:month/:day/*'				, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'details', 'type' => 'blog', 'year' => '[0-9]+', 'month' => '[0-9]+', 'day' => '[0-9]+'));
	Router::connect('/:shop/blog'									, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'posts', 'action' => 'index', 'type' => 'blog'));
	
	Router::connect('/:shop/contact'								, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'contact', 'action' => 'index'));

	Router::connect('/:shop'										, array('shop' => '[a-zA-Z0-9]+', 'controller' => 'shops', 'action' => 'index'));
	Router::connect('/:shop/:controller'							, array('shop' => '[a-zA-Z0-9]+', 'action' => 'index'));
	Router::connect('/:shop/:controller/:action'					, array('shop' => '[a-zA-Z0-9]+'));
	Router::connect('/:shop/:controller/:action/*'					, array('shop' => '[a-zA-Z0-9]+'));
	
?>